package com.zsrt.javaweb.ch02;

import org.junit.Test;

public class ArithmeticCalculateTest {
	
	
	
	
	@Test
	public void calculate() throws Exception {
		
		ArithmeticCalculate target = new ArithmeticCalculateImpl();
		
		ArithmeticCalculate proxy = new ArithmeticCalculateLoggingProxy(target).getProxy();
		
		int add = proxy.add(10, 20);
		//int add = target.add(10, 20);
		
		System.out.println("add="+add);
		
		
		System.out.println("-----------------------------------------");
		int sub =proxy.sub(6, 3);
		System.out.println("sub="+sub);
	}
	

}
